Show the code
library(maps)
library(tidyverse)
library(plotly)Analysis of FrogID data from TidyTuesday
FrogID is an Australian frog call identification initiative. The FrogID mobile app allows citizen scientists to record and submit frog calls for museum experts to identify. Since 2017, FrogID data has contributed to over 30 scientific papers exploring frog ecology, taxonomy, and conservation.
Timeo Coletta
September 2, 2025
Sources:
frogID_data <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-09-02/frogID_data.csv') |>
mutate(month = month(eventDate),
season = case_when(
month %in% c(12, 1, 2) ~ "winter",
month %in% c(3, 4, 5) ~ "spring",
month %in% c(6, 7, 8) ~ "summer",
month %in% c(9, 10, 11) ~ "fall"
))
frog_names <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-09-02/frog_names.csv')
all_frogs <- frogID_data |>
left_join(frog_names, by = "scientificName") |>
mutate(genus = stringr::str_extract(scientificName, "^\\w+"))ggplot(data = australia_map,
aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", color = "blue") +
geom_point(data = all_frogs,
aes(x = decimalLongitude,
y = decimalLatitude,
color = genus),
size = 1,
inherit.aes = FALSE) +
theme_minimal() +
ggtitle("Frogs in Australia: 2023") +
facet_wrap(~season) +
labs(x = "", y = "") +
scale_color_manual(values = mycols)
p <- ggplot(data = australia_map,
aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", color = "blue") +
geom_point(data = all_frogs,
aes(x = decimalLongitude,
y = decimalLatitude,
color = genus),
size = 1,
inherit.aes = FALSE) +
theme_minimal() +
theme(
panel.background = element_rect(fill = "lightsteelblue"),
panel.grid.major = element_line(color = "lightsteelblue"),
panel.grid.minor = element_line(color = "lightsteelblue2"),
axis.text = element_text(color = "black"),
axis.title = element_text(color = "black") ) +
ggtitle("Frogs in Australia: 2023") +
facet_wrap(~season) +
labs(x = "", y = "") +
scale_color_manual(values = mycols)
ggplotly(p, tooltip = "genus")